Under the influence of complex weather such as typhoon, heavy fog, rain and snow, as well as occlusions and scale changes, the existing ship detection methods have the problems of false detection and missed detection. In order to solve the above complex scene problems, based on YOLOX-S model, a multi-scale ship detection method based on adaptive feature fusion was proposed. Firstly, a feature augmentation module was introduced into the backbone feature extraction network to suppress the interference of complex background noise on ship feature extraction. Then, considering the problem of deep and shallow feature fusion proportion, an adaptive feature fusion module was designed to make full use of deep and shallow features, thereby improving the multi-scale ship detection ability of the model. Finally, in the detection head network, the detection head was decoupled and an adaptive multi-task loss function was introduced to balance classification tasks and regression tasks, thereby improving the multi-scale ship detection robustness of the model. Experimental results show that the detection mean Average Precision (mAP) of the proposed method on the public ship detection datasets SeaShips and McShips is 97.43% and 96.10%, respectively. The detection speed of the proposed method reaches 189 frames per second, which meets the requirements of real-time detection, demonstrating that the proposed method achieves high-precision detection of multi-scale ship targets even in complex scenes.